package cn.talk.socket.service;

import java.io.IOException;
import java.net.ServerSocket;

public class CrateService implements Runnable {

    @Override
    public void run() {
        ServerSocket serverSocket = null;
        try {
            serverSocket = new ServerSocket(9999);
            System.out.println("SOCKET服务启动成功");
            Service service = new Service(serverSocket);
            while (true) {
                service.crate();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
